module.exports=(curr,total)=>{
    var first=true,before=curr>=4,after=curr+2<total,last=true,start=curr-2,end=curr+2;
    if(1>=start-1){
        first=before=false;
        start=1;
    }
    if(total<=end+1){
        last=after=false;
        end=total;
    }
    return {
        isFirst:1==curr,
        isLast:total==curr,
        first:first,
        last:last,
        before:before,
        after:after,
        start:start,
        end:end,
        prev:1==curr?1:curr-1,
        next:total==curr?total:curr+1
    }
};